package com.seecen.service.impl;

import com.seecen.dao.DeptDao;
import com.seecen.entity.Dept;
import com.seecen.service.DeptService;
import com.seecen.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DeptServiceImpl  implements DeptService {

    @Autowired
    private DeptDao deptDao;

    @Autowired
    private EmpService empService;

    @Transactional
    public int save(Dept dept) {
        int res = deptDao.save(dept);
        System.out.println(res > 0 ? "保存部门成功" : "保存部门失败");
        return res;
    }
}




